package com.crane.oss.listener;

import java.util.ArrayList;
import java.util.List;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.crane.oss.school.bean.request.teacher.BatchImportTeacherEntity;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class UploadTeacherExcelListener extends AnalysisEventListener<BatchImportTeacherEntity> {
	
	public static final List<BatchImportTeacherEntity> list = new ArrayList<>();

	@Override
	public void invoke(BatchImportTeacherEntity data, AnalysisContext context) {
		log.info("BatchImportTeacher name={},phone={},sex={},type={}", data.getName(),data.getPhone(),data.getSex(),data.getType());
		list.add(data);
	}

	@Override
	public void doAfterAllAnalysed(AnalysisContext context) {
		// TODO Auto-generated method stub
		
	}

}
